/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Janela;

import Dao.SuspeitosDAO;
import Modelo.Cidades;
import Modelo.Suspeitos;
import UTIL.ManipularImagem;
import java.awt.LayoutManager;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JPanel;
import javax.swing.JScrollPane;


/**
 *
 * @author Victor
 */
public class dialogSuspeitos extends javax.swing.JDialog {

    private List<Suspeitos> pegasuspeito;

    /**
     * Creates new form dialogSuspeitos
     */
    public dialogSuspeitos(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
          
        initComponents();
        List<Suspeitos> suspeitos = new ArrayList<>();
        SuspeitosDAO dao = new SuspeitosDAO();

        suspeitos = dao.Listar();

        lblNome1.setText(suspeitos.get(0).getNomesuspeito());
        lblSexo1.setText(suspeitos.get(0).getSexo());
        lblOcupacao1.setText(suspeitos.get(0).getOcupacao());
        lblEsporte1.setText(suspeitos.get(0).getEsporte());
        lblCabelo1.setText(suspeitos.get(0).getCabelo());
        lblCarro1.setText(suspeitos.get(0).getCarro());
        lblTracos1.setText(suspeitos.get(0).getTracos());
        lblOutros1.setText(suspeitos.get(0).getOutros());
        ManipularImagem.exibiImagemLabel(suspeitos.get(0).getImagem(), lblExibeImagem1);

        lblNome2.setText(suspeitos.get(1).getNomesuspeito());
        lblSexo2.setText(suspeitos.get(1).getSexo());
        lblOcupacao2.setText(suspeitos.get(1).getOcupacao());
        lblEsporte2.setText(suspeitos.get(1).getEsporte());
        lblCabelo2.setText(suspeitos.get(1).getCabelo());
        lblCarro2.setText(suspeitos.get(1).getCarro());
        lblTracos2.setText(suspeitos.get(1).getTracos());
        lblOutros2.setText(suspeitos.get(1).getOutros());
        ManipularImagem.exibiImagemLabel(suspeitos.get(1).getImagem(), lblExibeImagem2);

        lblNome3.setText(suspeitos.get(2).getNomesuspeito());
        lblSexo3.setText(suspeitos.get(2).getSexo());
        lblOcupacao3.setText(suspeitos.get(2).getOcupacao());
        lblEsporte3.setText(suspeitos.get(2).getEsporte());
        lblCabelo3.setText(suspeitos.get(2).getCabelo());
        lblCarro3.setText(suspeitos.get(2).getCarro());
        lblTracos3.setText(suspeitos.get(2).getTracos());
        lblOutros3.setText(suspeitos.get(2).getOutros());
        ManipularImagem.exibiImagemLabel(suspeitos.get(2).getImagem(), lblExibeImagem3);

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        PainelTeste = new javax.swing.JPanel();
        lblCabelo2 = new javax.swing.JLabel();
        lblTracos2 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        lblExibeImagem1 = new javax.swing.JLabel();
        lblCarro2 = new javax.swing.JLabel();
        lblNome2 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        lblOutros2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        lblEsporte3 = new javax.swing.JLabel();
        lblSexo1 = new javax.swing.JLabel();
        lblCabelo3 = new javax.swing.JLabel();
        lblOcupacao1 = new javax.swing.JLabel();
        lblTracos3 = new javax.swing.JLabel();
        lblEsporte1 = new javax.swing.JLabel();
        lblCarro3 = new javax.swing.JLabel();
        lblCabelo1 = new javax.swing.JLabel();
        lblNome3 = new javax.swing.JLabel();
        lblTracos1 = new javax.swing.JLabel();
        lblOutros3 = new javax.swing.JLabel();
        lblCarro1 = new javax.swing.JLabel();
        lblSexo3 = new javax.swing.JLabel();
        lblNome1 = new javax.swing.JLabel();
        lblOutros1 = new javax.swing.JLabel();
        lblOcupacao3 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        lblExibeImagem2 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jPanel3 = new javax.swing.JPanel();
        lblExibeImagem3 = new javax.swing.JLabel();
        lblSexo2 = new javax.swing.JLabel();
        lblOcupacao2 = new javax.swing.JLabel();
        lblEsporte2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        lblCabelo2.setText("Cabelo ");

        lblTracos2.setText("Traços");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Imagem"));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblExibeImagem1, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(lblExibeImagem1, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
                .addContainerGap())
        );

        lblCarro2.setText("Carro ");

        lblNome2.setText("Nome do Suspeito ");

        jSeparator1.setForeground(new java.awt.Color(255, 102, 102));

        lblOutros2.setText("Outros");

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel1.setText("Suspeitos");

        lblEsporte3.setText("Esporte");

        lblSexo1.setText("Sexo");

        lblCabelo3.setText("Cabelo ");

        lblOcupacao1.setText("Ocupação");

        lblTracos3.setText("Traços");

        lblEsporte1.setText("Esporte");

        lblCarro3.setText("Carro ");

        lblCabelo1.setText("Cabelo ");

        lblNome3.setText("Nome do Suspeito ");

        lblTracos1.setText("Traços");

        lblOutros3.setText("Outros");

        lblCarro1.setText("Carro ");

        lblSexo3.setText("Sexo");

        lblNome1.setText("Nome do Suspeito ");

        lblOutros1.setText("Outros");

        lblOcupacao3.setText("Ocupação");

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Imagem"));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblExibeImagem2, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(lblExibeImagem2, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
                .addContainerGap())
        );

        jSeparator2.setForeground(new java.awt.Color(255, 102, 102));

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Imagem"));

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblExibeImagem3, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(lblExibeImagem3, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
                .addContainerGap())
        );

        lblSexo2.setText("Sexo");

        lblOcupacao2.setText("Ocupação");

        lblEsporte2.setText("Esporte");

        javax.swing.GroupLayout PainelTesteLayout = new javax.swing.GroupLayout(PainelTeste);
        PainelTeste.setLayout(PainelTesteLayout);
        PainelTesteLayout.setHorizontalGroup(
            PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelTesteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addGap(190, 190, 190)
                        .addComponent(jLabel1))
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblEsporte1)
                            .addComponent(lblSexo1)
                            .addComponent(lblCabelo1)
                            .addComponent(lblCarro1)
                            .addComponent(lblTracos1)
                            .addComponent(lblNome1)
                            .addComponent(lblOcupacao1)
                            .addComponent(lblOutros1)))
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 483, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblEsporte2)
                            .addComponent(lblSexo2)
                            .addComponent(lblCabelo2)
                            .addComponent(lblCarro2)
                            .addComponent(lblTracos2)
                            .addComponent(lblNome2)
                            .addComponent(lblOcupacao2)
                            .addComponent(lblOutros2)))
                    .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 483, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblEsporte3)
                            .addComponent(lblSexo3)
                            .addComponent(lblCabelo3)
                            .addComponent(lblCarro3)
                            .addComponent(lblTracos3)
                            .addComponent(lblNome3)
                            .addComponent(lblOcupacao3)
                            .addComponent(lblOutros3))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        PainelTesteLayout.setVerticalGroup(
            PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelTesteLayout.createSequentialGroup()
                .addGap(0, 11, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGroup(PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addGap(44, 44, 44)
                        .addComponent(lblNome1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblSexo1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblOcupacao1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblEsporte1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblCabelo1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblCarro1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblTracos1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblOutros1)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addGap(27, 27, 27)
                        .addComponent(lblNome2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblSexo2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblOcupacao2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblEsporte2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblCabelo2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblCarro2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblTracos2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblOutros2)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(PainelTesteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(PainelTesteLayout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addComponent(lblNome3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblSexo3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblOcupacao3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblEsporte3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblCabelo3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblCarro3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblTracos3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblOutros3))))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(PainelTeste, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(PainelTeste, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(dialogSuspeitos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(dialogSuspeitos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(dialogSuspeitos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(dialogSuspeitos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                dialogSuspeitos dialog = new dialogSuspeitos(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel PainelTeste;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JLabel lblCabelo1;
    private javax.swing.JLabel lblCabelo2;
    private javax.swing.JLabel lblCabelo3;
    private javax.swing.JLabel lblCarro1;
    private javax.swing.JLabel lblCarro2;
    private javax.swing.JLabel lblCarro3;
    private javax.swing.JLabel lblEsporte1;
    private javax.swing.JLabel lblEsporte2;
    private javax.swing.JLabel lblEsporte3;
    private javax.swing.JLabel lblExibeImagem1;
    private javax.swing.JLabel lblExibeImagem2;
    private javax.swing.JLabel lblExibeImagem3;
    private javax.swing.JLabel lblNome1;
    private javax.swing.JLabel lblNome2;
    private javax.swing.JLabel lblNome3;
    private javax.swing.JLabel lblOcupacao1;
    private javax.swing.JLabel lblOcupacao2;
    private javax.swing.JLabel lblOcupacao3;
    private javax.swing.JLabel lblOutros1;
    private javax.swing.JLabel lblOutros2;
    private javax.swing.JLabel lblOutros3;
    private javax.swing.JLabel lblSexo1;
    private javax.swing.JLabel lblSexo2;
    private javax.swing.JLabel lblSexo3;
    private javax.swing.JLabel lblTracos1;
    private javax.swing.JLabel lblTracos2;
    private javax.swing.JLabel lblTracos3;
    // End of variables declaration//GEN-END:variables
}
